import { defineMock } from "./base";

export default defineMock([
  // 数据源表格分页查询返回值
  {
    url: "dataSource/page",
    method: ["POST"],
    body: () => {
      return {
        code: "200",
        total: 2,
        size: 10,
        current: 1,
        pages: 1,
        msg: "成功",
        data: {
          list: [
            {
              id: 2,
              dataSourceName: "index_system",
              dataSourceType: 1,
              dataSourceDescription: "台式电脑机械硬盘SATA串口320G 500G 1TB 2T 3TB 4TB支持游戏监控",
              dataSourceAddress: "127.0.0.1",
              dataSourcePort: "3306",
              dataSourceUserName: "root",
              createUserId: "6",
              createUser: "freui8_p8h",
              createTime: "2025-02-14 11:20:15",
            },
            {
              id: 1,
              dataSourceName: "示国荣",
              dataSourceType: 77,
              dataSourceDescription: "台式电脑机械硬盘SATA串口320G 500G 1TB 2T 3TB 4TB支持游戏监控",
              dataSourceAddress: "81.204.201.107",
              dataSourcePort: "32347",
              dataSourceUserName: "tt6kfy_lsr50",
              createUserId: "6",
              createUser: "freui8_p8h",
              createTime: "2025-02-14 11:19:49",
            },
          ],
        },
      };
    },
  },
  {
    url: "dataSource/inlineTest/id type",
    method: ["GET"],
    body: () => {
      return {
        code: "200",
        data: {
          result: 1,
        },
      };
    },
  },
  {
    url: "dataSource/delete",
    method: ["GET"],
    body: () => {
      return {
        code: "200",
        data: {},
      };
    },
  },
]);
